package com.arcsoft.face;

import java.util.Arrays;
import java.util.List;

import com.sun.jna.Pointer;
import com.sun.jna.Structure;

public class MRECT extends Structure {
    public static class ByValue extends MRECT implements Structure.ByValue {
    }
    
    public static class ByReference extends MRECT implements Structure.ByReference{
    };
    
    public int left;
    public int top;
    public int right;
    public int bottom;
    
    public MRECT() {

    }
    
    public MRECT(Pointer p) {
    	super.useMemory(p);
        read();
    }
    
    @SuppressWarnings("rawtypes")
	@Override
    protected List getFieldOrder() { 
        return Arrays.asList("left", "top", "right", "bottom");
    }
    
    @Override
    public String toString() {
    	return "left:"+left+",right:"+right+",top:"+top+",bottom:"+bottom;
    }
}